import Vue from 'vue';
import './plugins/axios';
import App from './App.vue';
import './plugins/element.js';
import router from './router';

Vue.config.productionTip = false;

Vue.mixin({
  computed: {
    uploadUrl() {
      return `http://192.168.135.114:3000/admin/api/upload`;
    },
  },
  methods: {
    getAuthHeaders() {
      return {
        Authorization: `Bearer ${sessionStorage.token || ''}`,
      };
    },
  },
});

new Vue({
  router,
  render: (h) => h(App),
}).$mount('#app');
